# !pip install git+https://github.com/alberanid/rotopy
# !pip install pandas
# !pip install numpy
# !pip install matplotlib
# !pip install seaborn
# !pip install pandas_profiling --upgrade
# !pip install plotly
# !pip install wordcloud
# !pip install Flask
# Import Dataset
# Import File from Loacal Drive
# from google.colab import files
# data_to_load = files.upload()
# from google.colab import drive
# drive.mount('/content/drive')
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
import warnings
import collections
import plotly.express as px
import plotly.graph_objects as go
import nltk
import re
from nltk.corpus import stopwords
from nltk.tokenize import word_tokenize
from nltk.probability import FreqDist
from nltk.util import ngrams
from plotly.subplots import make_subplots
from plotly.offline import iplot, init_notebook_mode
from wordcloud import WordCloud, STOPWORDS
from pandas_profiling import ProfileReport
%matplotlib inline
warnings.filterwarnings("ignore")
nltk.download('all')
[nltk_data] Downloading collection 'all' [nltk_data] | [nltk_data] | Downloading package abc to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package abc is already up-to-date! [nltk_data] | Downloading package alpino to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package alpino is already up-to-date! [nltk_data] | Downloading package biocreative_ppi to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package biocreative_ppi is already up-to-date! [nltk_data] | Downloading package brown to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package brown is already up-to-date! [nltk_data] | Downloading package brown_tei to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package brown_tei is already up-to-date! [nltk_data] | Downloading package cess_cat to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package cess_cat is already up-to-date! [nltk_data] | Downloading package cess_esp to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package cess_esp is already up-to-date! [nltk_data] | Downloading package chat80 to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package chat80 is already up-to-date! [nltk_data] | Downloading package city_database to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package city_database is already up-to-date! [nltk_data] | Downloading package cmudict to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package cmudict is already up-to-date! [nltk_data] | Downloading package comparative_sentences to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package comparative_sentences is already up-to- [nltk_data] | date! [nltk_data] | Downloading package comtrans to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package comtrans is already up-to-date! [nltk_data] | Downloading package conll2000 to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package conll2000 is already up-to-date! [nltk_data] | Downloading package conll2002 to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package conll2002 is already up-to-date! [nltk_data] | Downloading package conll2007 to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package conll2007 is already up-to-date! [nltk_data] | Downloading package crubadan to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package crubadan is already up-to-date! [nltk_data] | Downloading package dependency_treebank to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package dependency_treebank is already up-to-date! [nltk_data] | Downloading package dolch to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package dolch is already up-to-date! [nltk_data] | Downloading package europarl_raw to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package europarl_raw is already up-to-date! [nltk_data] | Downloading package floresta to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package floresta is already up-to-date! [nltk_data] | Downloading package framenet_v15 to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package framenet_v15 is already up-to-date! [nltk_data] | Downloading package framenet_v17 to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package framenet_v17 is already up-to-date! [nltk_data] | Downloading package gazetteers to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package gazetteers is already up-to-date! [nltk_data] | Downloading package genesis to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package genesis is already up-to-date! [nltk_data] | Downloading package gutenberg to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package gutenberg is already up-to-date! [nltk_data] | Downloading package ieer to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package ieer is already up-to-date! [nltk_data] | Downloading package inaugural to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package inaugural is already up-to-date! [nltk_data] | Downloading package indian to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package indian is already up-to-date! [nltk_data] | Downloading package jeita to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package jeita is already up-to-date! [nltk_data] | Downloading package kimmo to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package kimmo is already up-to-date! [nltk_data] | Downloading package knbc to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package knbc is already up-to-date! [nltk_data] | Downloading package lin_thesaurus to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package lin_thesaurus is already up-to-date! [nltk_data] | Downloading package mac_morpho to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package mac_morpho is already up-to-date! [nltk_data] | Downloading package machado to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package machado is already up-to-date! [nltk_data] | Downloading package masc_tagged to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package masc_tagged is already up-to-date! [nltk_data] | Downloading package moses_sample to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package moses_sample is already up-to-date! [nltk_data] | Downloading package movie_reviews to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package movie_reviews is already up-to-date! [nltk_data] | Downloading package names to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package names is already up-to-date! [nltk_data] | Downloading package nombank.1.0 to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package nombank.1.0 is already up-to-date! [nltk_data] | Downloading package nps_chat to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package nps_chat is already up-to-date! [nltk_data] | Downloading package omw to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package omw is already up-to-date! [nltk_data] | Downloading package opinion_lexicon to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package opinion_lexicon is already up-to-date! [nltk_data] | Downloading package paradigms to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package paradigms is already up-to-date! [nltk_data] | Downloading package pil to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package pil is already up-to-date! [nltk_data] | Downloading package pl196x to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package pl196x is already up-to-date! [nltk_data] | Downloading package ppattach to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package ppattach is already up-to-date! [nltk_data] | Downloading package problem_reports to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package problem_reports is already up-to-date! [nltk_data] | Downloading package propbank to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package propbank is already up-to-date! [nltk_data] | Downloading package ptb to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package ptb is already up-to-date! [nltk_data] | Downloading package product_reviews_1 to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package product_reviews_1 is already up-to-date! [nltk_data] | Downloading package product_reviews_2 to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package product_reviews_2 is already up-to-date! [nltk_data] | Downloading package pros_cons to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package pros_cons is already up-to-date! [nltk_data] | Downloading package qc to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package qc is already up-to-date! [nltk_data] | Downloading package reuters to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package reuters is already up-to-date! [nltk_data] | Downloading package rte to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package rte is already up-to-date! [nltk_data] | Downloading package semcor to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package semcor is already up-to-date! [nltk_data] | Downloading package senseval to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package senseval is already up-to-date! [nltk_data] | Downloading package sentiwordnet to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package sentiwordnet is already up-to-date! [nltk_data] | Downloading package sentence_polarity to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package sentence_polarity is already up-to-date! [nltk_data] | Downloading package shakespeare to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package shakespeare is already up-to-date! [nltk_data] | Downloading package sinica_treebank to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package sinica_treebank is already up-to-date! [nltk_data] | Downloading package smultron to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package smultron is already up-to-date! [nltk_data] | Downloading package state_union to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package state_union is already up-to-date! [nltk_data] | Downloading package stopwords to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package stopwords is already up-to-date! [nltk_data] | Downloading package subjectivity to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package subjectivity is already up-to-date! [nltk_data] | Downloading package swadesh to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package swadesh is already up-to-date! [nltk_data] | Downloading package switchboard to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package switchboard is already up-to-date! [nltk_data] | Downloading package timit to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package timit is already up-to-date! [nltk_data] | Downloading package toolbox to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package toolbox is already up-to-date! [nltk_data] | Downloading package treebank to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package treebank is already up-to-date! [nltk_data] | Downloading package twitter_samples to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package twitter_samples is already up-to-date! [nltk_data] | Downloading package udhr to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package udhr is already up-to-date! [nltk_data] | Downloading package udhr2 to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package udhr2 is already up-to-date! [nltk_data] | Downloading package unicode_samples to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package unicode_samples is already up-to-date! [nltk_data] | Downloading package universal_treebanks_v20 to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package universal_treebanks_v20 is already up-to- [nltk_data] | date! [nltk_data] | Downloading package verbnet to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package verbnet is already up-to-date! [nltk_data] | Downloading package verbnet3 to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package verbnet3 is already up-to-date! [nltk_data] | Downloading package webtext to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package webtext is already up-to-date! [nltk_data] | Downloading package wordnet to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package wordnet is already up-to-date! [nltk_data] | Downloading package wordnet_ic to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package wordnet_ic is already up-to-date! [nltk_data] | Downloading package words to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package words is already up-to-date! [nltk_data] | Downloading package ycoe to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package ycoe is already up-to-date! [nltk_data] | Downloading package rslp to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package rslp is already up-to-date! [nltk_data] | Downloading package maxent_treebank_pos_tagger to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package maxent_treebank_pos_tagger is already up- [nltk_data] | to-date! [nltk_data] | Downloading package universal_tagset to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package universal_tagset is already up-to-date! [nltk_data] | Downloading package maxent_ne_chunker to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package maxent_ne_chunker is already up-to-date! [nltk_data] | Downloading package punkt to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package punkt is already up-to-date! [nltk_data] | Downloading package book_grammars to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package book_grammars is already up-to-date! [nltk_data] | Downloading package sample_grammars to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package sample_grammars is already up-to-date! [nltk_data] | Downloading package spanish_grammars to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package spanish_grammars is already up-to-date! [nltk_data] | Downloading package basque_grammars to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package basque_grammars is already up-to-date! [nltk_data] | Downloading package large_grammars to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package large_grammars is already up-to-date! [nltk_data] | Downloading package tagsets to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package tagsets is already up-to-date! [nltk_data] | Downloading package snowball_data to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package snowball_data is already up-to-date! [nltk_data] | Downloading package bllip_wsj_no_aux to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package bllip_wsj_no_aux is already up-to-date! [nltk_data] | Downloading package word2vec_sample to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package word2vec_sample is already up-to-date! [nltk_data] | Downloading package panlex_swadesh to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package panlex_swadesh is already up-to-date! [nltk_data] | Downloading package mte_teip5 to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package mte_teip5 is already up-to-date! [nltk_data] | Downloading package averaged_perceptron_tagger to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package averaged_perceptron_tagger is already up- [nltk_data] | to-date! [nltk_data] | Downloading package averaged_perceptron_tagger_ru to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package averaged_perceptron_tagger_ru is already [nltk_data] | up-to-date! [nltk_data] | Downloading package perluniprops to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package perluniprops is already up-to-date! [nltk_data] | Downloading package nonbreaking_prefixes to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package nonbreaking_prefixes is already up-to-date! [nltk_data] | Downloading package vader_lexicon to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package vader_lexicon is already up-to-date! [nltk_data] | Downloading package porter_test to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package porter_test is already up-to-date! [nltk_data] | Downloading package wmt15_eval to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package wmt15_eval is already up-to-date! [nltk_data] | Downloading package mwa_ppdb to [nltk_data] | C:\Users\pawan\AppData\Roaming\nltk_data... [nltk_data] | Package mwa_ppdb is already up-to-date! [nltk_data] | [nltk_data] Done downloading collection all
True
# path = '/content/drive/MyDrive/Files/'
path = 'C:\\Users\\pawan\\OneDrive\\Desktop\\ott\\Data\\'
df_movies = pd.read_csv(path + 'ottmovies.csv')
df_movies.head()
| ID | Title | Year | Age | IMDb | Rotten Tomatoes | Directors | Cast | Genres | Country | Language | Plotline | Runtime | Kind | Seasons | Netflix | Hulu | Prime Video | Disney+ | Type | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 1 | Inception | 2010 | 13+ | 8.8 | 87% | Christopher Nolan | Leonardo DiCaprio,Joseph Gordon-Levitt,Elliot ... | Action,Adventure,Sci-Fi,Thriller | United States,United Kingdom | English,Japanese,French | Dom Cobb is a skilled thief, the absolute best... | 148.0 | movie | NaN | 1 | 0 | 0 | 0 | 0 |
| 1 | 2 | The Matrix | 1999 | 16+ | 8.7 | 88% | Lana Wachowski,Lilly Wachowski | Keanu Reeves,Laurence Fishburne,Carrie-Anne Mo... | Action,Sci-Fi | United States | English | Thomas A. Anderson is a man living two lives. ... | 136.0 | movie | NaN | 1 | 0 | 0 | 0 | 0 |
| 2 | 3 | Avengers: Infinity War | 2018 | 13+ | 8.4 | 85% | Anthony Russo,Joe Russo | Robert Downey Jr.,Chris Hemsworth,Mark Ruffalo... | Action,Adventure,Sci-Fi | United States | English | As the Avengers and their allies have continue... | 149.0 | movie | NaN | 1 | 0 | 0 | 0 | 0 |
| 3 | 4 | Back to the Future | 1985 | 7+ | 8.5 | 96% | Robert Zemeckis | Michael J. Fox,Christopher Lloyd,Lea Thompson,... | Adventure,Comedy,Sci-Fi | United States | English | Marty McFly, a typical American teenager of th... | 116.0 | movie | NaN | 1 | 0 | 0 | 0 | 0 |
| 4 | 5 | The Good, the Bad and the Ugly | 1966 | 16+ | 8.8 | 97% | Sergio Leone | Eli Wallach,Clint Eastwood,Lee Van Cleef,Aldo ... | Western | Italy,Spain,West Germany,United States | Italian | Blondie (The Good) (Clint Eastwood) is a profe... | 161.0 | movie | NaN | 1 | 0 | 1 | 0 | 0 |
# profile = ProfileReport(df_movies)
# profile
def data_investigate(df):
print('No of Rows : ', df.shape[0])
print('No of Coloums : ', df.shape[1])
print('**'*25)
print('Colums Names : \n', df.columns)
print('**'*25)
print('Datatype of Columns : \n', df.dtypes)
print('**'*25)
print('Missing Values : ')
c = df.isnull().sum()
c = c[c > 0]
print(c)
print('**'*25)
print('Missing vaules %age wise :\n')
print((100*(df.isnull().sum()/len(df.index))))
print('**'*25)
print('Pictorial Representation : ')
plt.figure(figsize = (10, 10))
sns.heatmap(df.isnull(), yticklabels = False, cbar = False)
plt.show()
data_investigate(df_movies)
No of Rows : 16923
No of Coloums : 20
**************************************************
Colums Names :
Index(['ID', 'Title', 'Year', 'Age', 'IMDb', 'Rotten Tomatoes', 'Directors',
'Cast', 'Genres', 'Country', 'Language', 'Plotline', 'Runtime', 'Kind',
'Seasons', 'Netflix', 'Hulu', 'Prime Video', 'Disney+', 'Type'],
dtype='object')
**************************************************
Datatype of Columns :
ID int64
Title object
Year int64
Age object
IMDb float64
Rotten Tomatoes object
Directors object
Cast object
Genres object
Country object
Language object
Plotline object
Runtime float64
Kind object
Seasons float64
Netflix int64
Hulu int64
Prime Video int64
Disney+ int64
Type int64
dtype: object
**************************************************
Missing Values :
Age 8457
IMDb 328
Rotten Tomatoes 10437
Directors 357
Cast 648
Genres 234
Country 303
Language 437
Plotline 4958
Runtime 382
Seasons 16923
dtype: int64
**************************************************
Missing vaules %age wise :
ID 0.000000
Title 0.000000
Year 0.000000
Age 49.973409
IMDb 1.938191
Rotten Tomatoes 61.673462
Directors 2.109555
Cast 3.829108
Genres 1.382734
Country 1.790463
Language 2.582284
Plotline 29.297406
Runtime 2.257283
Kind 0.000000
Seasons 100.000000
Netflix 0.000000
Hulu 0.000000
Prime Video 0.000000
Disney+ 0.000000
Type 0.000000
dtype: float64
**************************************************
Pictorial Representation :
# ID
# df_movies = df_movies.drop(['ID'], axis = 1)
# Age
df_movies.loc[df_movies['Age'].isnull() & df_movies['Disney+'] == 1, "Age"] = '13'
# df_movies.fillna({'Age' : 18}, inplace = True)
df_movies.fillna({'Age' : 'NR'}, inplace = True)
df_movies['Age'].replace({'all': '0'}, inplace = True)
df_movies['Age'].replace({'7+': '7'}, inplace = True)
df_movies['Age'].replace({'13+': '13'}, inplace = True)
df_movies['Age'].replace({'16+': '16'}, inplace = True)
df_movies['Age'].replace({'18+': '18'}, inplace = True)
# df_movies['Age'] = df_movies['Age'].astype(int)
# IMDb
# df_movies.fillna({'IMDb' : df_movies['IMDb'].mean()}, inplace = True)
# df_movies.fillna({'IMDb' : df_movies['IMDb'].median()}, inplace = True)
df_movies.fillna({'IMDb' : "NA"}, inplace = True)
# Rotten Tomatoes
df_movies['Rotten Tomatoes'] = df_movies['Rotten Tomatoes'][df_movies['Rotten Tomatoes'].notnull()].str.replace('%', '').astype(int)
# df_movies['Rotten Tomatoes'] = df_movies['Rotten Tomatoes'][df_movies['Rotten Tomatoes'].notnull()].astype(int)
# df_movies.fillna({'Rotten Tomatoes' : df_movies['Rotten Tomatoes'].mean()}, inplace = True)
# df_movies.fillna({'Rotten Tomatoes' : df_movies['Rotten Tomatoes'].median()}, inplace = True)
# df_movies['Rotten Tomatoes'] = df_movies['Rotten Tomatoes'].astype(int)
df_movies.fillna({'Rotten Tomatoes' : "NA"}, inplace = True)
# Directors
# df_movies = df_movies.drop(['Directors'], axis = 1)
df_movies.fillna({'Directors' : "NA"}, inplace = True)
# Cast
df_movies.fillna({'Cast' : "NA"}, inplace = True)
# Genres
df_movies.fillna({'Genres': "NA"}, inplace = True)
# Country
df_movies.fillna({'Country': "NA"}, inplace = True)
# Language
df_movies.fillna({'Language': "NA"}, inplace = True)
# Plotline
df_movies.fillna({'Plotline': "NA"}, inplace = True)
# Runtime
# df_movies.fillna({'Runtime' : df_movies['Runtime'].mean()}, inplace = True)
# df_movies['Runtime'] = df_movies['Runtime'].astype(int)
df_movies.fillna({'Runtime' : "NA"}, inplace = True)
# Kind
# df_movies.fillna({'Kind': "NA"}, inplace = True)
# Type
# df_movies.fillna({'Type': "NA"}, inplace = True)
# df_movies = df_movies.drop(['Type'], axis = 1)
# Seasons
# df_movies.fillna({'Seasons': 1}, inplace = True)
# df_movies.fillna({'Seasons': "NA"}, inplace = True)
df_movies = df_movies.drop(['Seasons'], axis = 1)
# df_movies['Seasons'] = df_movies['Seasons'].astype(int)
# df_movies.fillna({'Seasons' : df_movies['Seasons'].mean()}, inplace = True)
# df_movies['Seasons'] = df_movies['Seasons'].astype(int)
# Service Provider
df_movies['Service Provider'] = df_movies.loc[:, ['Netflix', 'Prime Video', 'Disney+', 'Hulu']].idxmax(axis = 1)
# df_movies.drop(['Netflix','Prime Video','Disney+','Hulu'], axis = 1)
# Removing Duplicate and Missing Entries
df_movies.dropna(how = 'any', inplace = True)
df_movies.drop_duplicates(inplace = True)
data_investigate(df_movies)
No of Rows : 16923
No of Coloums : 20
**************************************************
Colums Names :
Index(['ID', 'Title', 'Year', 'Age', 'IMDb', 'Rotten Tomatoes', 'Directors',
'Cast', 'Genres', 'Country', 'Language', 'Plotline', 'Runtime', 'Kind',
'Netflix', 'Hulu', 'Prime Video', 'Disney+', 'Type',
'Service Provider'],
dtype='object')
**************************************************
Datatype of Columns :
ID int64
Title object
Year int64
Age object
IMDb object
Rotten Tomatoes object
Directors object
Cast object
Genres object
Country object
Language object
Plotline object
Runtime object
Kind object
Netflix int64
Hulu int64
Prime Video int64
Disney+ int64
Type int64
Service Provider object
dtype: object
**************************************************
Missing Values :
Series([], dtype: int64)
**************************************************
Missing vaules %age wise :
ID 0.0
Title 0.0
Year 0.0
Age 0.0
IMDb 0.0
Rotten Tomatoes 0.0
Directors 0.0
Cast 0.0
Genres 0.0
Country 0.0
Language 0.0
Plotline 0.0
Runtime 0.0
Kind 0.0
Netflix 0.0
Hulu 0.0
Prime Video 0.0
Disney+ 0.0
Type 0.0
Service Provider 0.0
dtype: float64
**************************************************
Pictorial Representation :
df_movies.head()
| ID | Title | Year | Age | IMDb | Rotten Tomatoes | Directors | Cast | Genres | Country | Language | Plotline | Runtime | Kind | Netflix | Hulu | Prime Video | Disney+ | Type | Service Provider | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 1 | Inception | 2010 | 13 | 8.8 | 87 | Christopher Nolan | Leonardo DiCaprio,Joseph Gordon-Levitt,Elliot ... | Action,Adventure,Sci-Fi,Thriller | United States,United Kingdom | English,Japanese,French | Dom Cobb is a skilled thief, the absolute best... | 148 | movie | 1 | 0 | 0 | 0 | 0 | Netflix |
| 1 | 2 | The Matrix | 1999 | 16 | 8.7 | 88 | Lana Wachowski,Lilly Wachowski | Keanu Reeves,Laurence Fishburne,Carrie-Anne Mo... | Action,Sci-Fi | United States | English | Thomas A. Anderson is a man living two lives. ... | 136 | movie | 1 | 0 | 0 | 0 | 0 | Netflix |
| 2 | 3 | Avengers: Infinity War | 2018 | 13 | 8.4 | 85 | Anthony Russo,Joe Russo | Robert Downey Jr.,Chris Hemsworth,Mark Ruffalo... | Action,Adventure,Sci-Fi | United States | English | As the Avengers and their allies have continue... | 149 | movie | 1 | 0 | 0 | 0 | 0 | Netflix |
| 3 | 4 | Back to the Future | 1985 | 7 | 8.5 | 96 | Robert Zemeckis | Michael J. Fox,Christopher Lloyd,Lea Thompson,... | Adventure,Comedy,Sci-Fi | United States | English | Marty McFly, a typical American teenager of th... | 116 | movie | 1 | 0 | 0 | 0 | 0 | Netflix |
| 4 | 5 | The Good, the Bad and the Ugly | 1966 | 16 | 8.8 | 97 | Sergio Leone | Eli Wallach,Clint Eastwood,Lee Van Cleef,Aldo ... | Western | Italy,Spain,West Germany,United States | Italian | Blondie (The Good) (Clint Eastwood) is a profe... | 161 | movie | 1 | 0 | 1 | 0 | 0 | Netflix |
df_movies.describe()
| ID | Year | Netflix | Hulu | Prime Video | Disney+ | Type | |
|---|---|---|---|---|---|---|---|
| count | 16923.000000 | 16923.000000 | 16923.000000 | 16923.000000 | 16923.000000 | 16923.000000 | 16923.0 |
| mean | 8462.000000 | 2003.211901 | 0.214915 | 0.062637 | 0.727235 | 0.033150 | 0.0 |
| std | 4885.393638 | 20.526532 | 0.410775 | 0.242315 | 0.445394 | 0.179034 | 0.0 |
| min | 1.000000 | 1901.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.0 |
| 25% | 4231.500000 | 2001.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.0 |
| 50% | 8462.000000 | 2012.000000 | 0.000000 | 0.000000 | 1.000000 | 0.000000 | 0.0 |
| 75% | 12692.500000 | 2016.000000 | 0.000000 | 0.000000 | 1.000000 | 0.000000 | 0.0 |
| max | 16923.000000 | 2020.000000 | 1.000000 | 1.000000 | 1.000000 | 1.000000 | 0.0 |
df_movies.corr()
| ID | Year | Netflix | Hulu | Prime Video | Disney+ | Type | |
|---|---|---|---|---|---|---|---|
| ID | 1.000000 | -0.217816 | -0.644470 | -0.129926 | 0.469301 | 0.263530 | NaN |
| Year | -0.217816 | 1.000000 | 0.256151 | 0.101337 | -0.255578 | -0.047258 | NaN |
| Netflix | -0.644470 | 0.256151 | 1.000000 | -0.118032 | -0.745141 | -0.089649 | NaN |
| Hulu | -0.129926 | 0.101337 | -0.118032 | 1.000000 | -0.284654 | -0.039693 | NaN |
| Prime Video | 0.469301 | -0.255578 | -0.745141 | -0.284654 | 1.000000 | -0.289008 | NaN |
| Disney+ | 0.263530 | -0.047258 | -0.089649 | -0.039693 | -0.289008 | 1.000000 | NaN |
| Type | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
# df_movies.sort_values('Year', ascending = True)
# df_movies.sort_values('Rotten Tomatoes', ascending = False)
# df_movies.to_csv(path_or_buf= '/content/drive/MyDrive/Files/updated_ottmovies.csv', index = False)
# path = '/content/drive/MyDrive/Files/'
# udf_movies = pd.read_csv(path + 'updated_ottmovies.csv')
# udf_movies
# df_netflix_movies = df_movies.loc[(df_movies['Netflix'] > 0)]
# df_hulu_movies = df_movies.loc[(df_movies['Hulu'] > 0)]
# df_prime_video_movies = df_movies.loc[(df_movies['Prime Video'] > 0)]
# df_disney_movies = df_movies.loc[(df_movies['Disney+'] > 0)]
df_netflix_only_movies = df_movies[(df_movies['Netflix'] == 1) & (df_movies['Hulu'] == 0) & (df_movies['Prime Video'] == 0 ) & (df_movies['Disney+'] == 0)]
df_hulu_only_movies = df_movies[(df_movies['Netflix'] == 0) & (df_movies['Hulu'] == 1) & (df_movies['Prime Video'] == 0 ) & (df_movies['Disney+'] == 0)]
df_prime_video_only_movies = df_movies[(df_movies['Netflix'] == 0) & (df_movies['Hulu'] == 0) & (df_movies['Prime Video'] == 1 ) & (df_movies['Disney+'] == 0)]
df_disney_only_movies = df_movies[(df_movies['Netflix'] == 0) & (df_movies['Hulu'] == 0) & (df_movies['Prime Video'] == 0 ) & (df_movies['Disney+'] == 1)]
df_movies_roto = df_movies.copy()
df_movies_roto.drop(df_movies_roto.loc[df_movies_roto['Rotten Tomatoes'] == "NA"].index, inplace = True)
# df_movies_roto = df_movies_roto[df_movies_roto.Rotten Tomatoes != "NA"]
df_movies_roto['Rotten Tomatoes'] = df_movies_roto['Rotten Tomatoes'].astype(int)
# Creating distinct dataframes only with the movies present on individual streaming platforms
netflix_roto_movies = df_movies_roto.loc[df_movies_roto['Netflix'] == 1]
hulu_roto_movies = df_movies_roto.loc[df_movies_roto['Hulu'] == 1]
prime_video_roto_movies = df_movies_roto.loc[df_movies_roto['Prime Video'] == 1]
disney_roto_movies = df_movies_roto.loc[df_movies_roto['Disney+'] == 1]
df_movies_roto_group = df_movies_roto.copy()
plt.figure(figsize = (10, 10))
corr = df_movies_roto.corr()
# Plot figsize
fig, ax = plt.subplots(figsize=(10, 8))
# Generate Heat Map, allow annotations and place floats in map
sns.heatmap(corr, cmap = 'magma', annot = True, fmt = ".2f")
# Apply xticks
plt.xticks(range(len(corr.columns)), corr.columns);
# Apply yticks
plt.yticks(range(len(corr.columns)), corr.columns)
# show plot
plt.show()
fig.show()
<Figure size 720x720 with 0 Axes>
df_roto_high_movies = df_movies_roto.sort_values(by = 'Rotten Tomatoes', ascending = False).reset_index()
df_roto_high_movies = df_roto_high_movies.drop(['index'], axis = 1)
# filter = (df_movies_roto['Rotten Tomatoes'] == (df_movies_roto['Rotten Tomatoes'].max()))
# df_roto_high_movies = df_movies_roto[filter]
# highest_rated_movies = df_movies_roto.loc[df_movies_roto['Rotten Tomatoes'].idxmax()]
print('\nMovies with Highest Ever Rotten Tomatoes are : \n')
df_roto_high_movies.head(5)
Movies with Highest Ever Rotten Tomatoes are :
| ID | Title | Year | Age | IMDb | Rotten Tomatoes | Directors | Cast | Genres | Country | Language | Plotline | Runtime | Kind | Netflix | Hulu | Prime Video | Disney+ | Type | Service Provider | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 4561 | Pyaasa | 1957 | NR | 8.5 | 100 | Guru Dutt | Guru Dutt,Waheeda Rehman,Mala Sinha,Rehman,Joh... | Drama,Musical,Romance | India | Hindi | Unemployed Vijay is the youngest in his family... | 146 | movie | 0 | 0 | 1 | 0 | 0 | Prime Video |
| 1 | 4405 | My Name Is Nobody | 1973 | 7 | 7.5 | 100 | Tonino Valerii | Terence Hill,Henry Fonda,Jean Martin,R.G. Arms... | Comedy,Western | Italy,France,West Germany | Italian | Jack Beauregard, once the greatest gunslinger ... | 116 | movie | 0 | 0 | 1 | 0 | 0 | Prime Video |
| 2 | 5255 | Racing Dreams | 2010 | 7 | 7 | 100 | Marshall Curry | Annabeth Barnes,Josh Hobson,Brandon Warren,Rus... | Documentary,Sport | United States | English | Sidney Poitier returned to the big screen in t... | 93 | movie | 0 | 0 | 1 | 0 | 0 | Prime Video |
| 3 | 5259 | Shoot to Kill | 1988 | 16 | 6.8 | 100 | Roger Spottiswoode | Sidney Poitier,Tom Berenger,Kirstie Alley,Clan... | Action,Adventure,Crime,Drama,Thriller | United States,Canada | English | Down on his luck and perpetually impecunious, ... | 110 | movie | 0 | 0 | 1 | 0 | 0 | Prime Video |
| 4 | 412 | Ice Guardians | 2016 | NR | 7.5 | 100 | Brett Harvey | Jay Baruchel,Jarome Iginla,Chris Chelios,Brett... | Documentary,Sport | Canada,Ireland,United States | English | NA | 108 | movie | 1 | 0 | 0 | 0 | 0 | Netflix |
fig = px.bar(y = df_roto_high_movies['Title'][:15],
x = df_roto_high_movies['Rotten Tomatoes'][:15],
color = df_roto_high_movies['Rotten Tomatoes'][:15],
color_continuous_scale = 'Teal_r',
labels = { 'y' : 'Movies', 'x' : 'Rotten Tomatoes : Rating'},
title = 'Movies with Highest Rotten Tomatoes : All Platforms')
fig.update_layout(plot_bgcolor = 'white')
fig.show()
df_roto_low_movies = df_movies_roto.sort_values(by = 'Rotten Tomatoes', ascending = True).reset_index()
df_roto_low_movies = df_roto_low_movies.drop(['index'], axis = 1)
# filter = (df_movies_roto['Rotten Tomatoes'] == (df_movies_roto['Rotten Tomatoes'].min()))
# df_roto_low_movies = df_movies_roto[filter]
print('\nMovies with Lowest Ever Rotten Tomatoes are : \n')
df_roto_low_movies.head(5)
Movies with Lowest Ever Rotten Tomatoes are :
| ID | Title | Year | Age | IMDb | Rotten Tomatoes | Directors | Cast | Genres | Country | Language | Plotline | Runtime | Kind | Netflix | Hulu | Prime Video | Disney+ | Type | Service Provider | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 2015 | Term Life | 2016 | 16 | 5.6 | 0 | Peter Billingsley | Vince Vaughn,Hailee Steinfeld,Bill Paxton,Jona... | Action,Crime,Drama,Thriller | United States | English | NA | 93 | movie | 1 | 0 | 0 | 0 | 0 | Netflix |
| 1 | 8168 | Speed Kills | 2018 | 16 | 4.3 | 0 | Jodi Scurfield | John Travolta,Katheryn Winnick,Jennifer Esposi... | Action,Crime,Drama,Thriller | Puerto Rico,United States | English,Spanish | NA | 102 | movie | 0 | 0 | 1 | 0 | 0 | Prime Video |
| 2 | 3331 | John Henry | 2020 | 16 | 3.5 | 0 | Will Forbes | Terry Crews,Jamila Velazquez,Ludacris,Ken Fore... | Drama,Thriller | United States | English | Ex-gang member John Henry (Terry Crews) is a q... | 91 | movie | 1 | 0 | 0 | 0 | 0 | Netflix |
| 3 | 1422 | The Coldest Game | 2019 | 18 | 6.2 | 0 | Lukasz Kosmicki | Bill Pullman,Lotte Verbeek,James Bloor,Robert ... | History,Sport,Thriller | Poland,United States | English,Russian | Playing a major chess match in Warsaw against ... | 102 | movie | 1 | 0 | 0 | 0 | 0 | Netflix |
| 4 | 9800 | Shadows & Lies | 2010 | 16 | 4.3 | 0 | Jay Anania | James Franco,Julianne Nicholson,Martin Donovan... | Crime,Drama | United States | English | NA | 100 | movie | 0 | 0 | 1 | 0 | 0 | Prime Video |
fig = px.bar(y = df_roto_low_movies['Title'][:15],
x = df_roto_low_movies['Rotten Tomatoes'][:15],
color = df_roto_low_movies['Rotten Tomatoes'][:15],
color_continuous_scale = 'Teal_r',
labels = { 'y' : 'Movies', 'x' : 'Rotten Tomatoes : Rating'},
title = 'Movies with Lowest Rotten Tomatoes : All Platforms')
fig.update_layout(plot_bgcolor = 'white')
fig.show()
print(f'''
Total '{df_movies_roto['Rotten Tomatoes'].unique().shape[0]}' unique Rotten Tomatoes s were Given, They were Like this,\n
{df_movies_roto.sort_values(by = 'Rotten Tomatoes', ascending = False)['Rotten Tomatoes'].unique()}\n
The Highest Ever Rotten Tomatoes Ever Any Movie Got is '{df_roto_high_movies['Title'][0]}' : '{df_roto_high_movies['Rotten Tomatoes'].max()}'\n
The Lowest Ever Rotten Tomatoes Ever Any Movie Got is '{df_roto_low_movies['Title'][0]}' : '{df_roto_low_movies['Rotten Tomatoes'].min()}'\n
''')
Total '101' unique Rotten Tomatoes s were Given, They were Like this,
[100 99 98 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83
82 81 80 79 78 77 76 75 74 73 72 71 70 69 68 67 66 65
64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47
46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29
28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11
10 9 8 7 6 5 4 3 2 1 0]
The Highest Ever Rotten Tomatoes Ever Any Movie Got is 'Pyaasa' : '100'
The Lowest Ever Rotten Tomatoes Ever Any Movie Got is 'Term Life' : '0'
netflix_roto_high_movies = df_roto_high_movies.loc[df_roto_high_movies['Netflix']==1].reset_index()
netflix_roto_high_movies = netflix_roto_high_movies.drop(['index'], axis = 1)
netflix_roto_low_movies = df_roto_low_movies.loc[df_roto_low_movies['Netflix']==1].reset_index()
netflix_roto_low_movies = netflix_roto_low_movies.drop(['index'], axis = 1)
netflix_roto_high_movies.head(5)
| ID | Title | Year | Age | IMDb | Rotten Tomatoes | Directors | Cast | Genres | Country | Language | Plotline | Runtime | Kind | Netflix | Hulu | Prime Video | Disney+ | Type | Service Provider | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 412 | Ice Guardians | 2016 | NR | 7.5 | 100 | Brett Harvey | Jay Baruchel,Jarome Iginla,Chris Chelios,Brett... | Documentary,Sport | Canada,Ireland,United States | English | NA | 108 | movie | 1 | 0 | 0 | 0 | 0 | Netflix |
| 1 | 2340 | Maria Bamford: Old Baby | 2017 | 18 | 6 | 100 | Jessica Yu | Maria Bamford,Rhea Butcher,Alex Blue Davis,Mel... | Documentary,Comedy | United States | English | NA | 64 | movie | 1 | 0 | 0 | 0 | 0 | Netflix |
| 2 | 946 | 07:19 | 2016 | NR | 5.9 | 100 | Jorge Michel Grau | Carmen Beato,Demián Bichir,Héctor Bonilla,Octa... | Drama,History | Mexico | Spanish | Martin and Fernando are at the reception of th... | 94 | movie | 1 | 0 | 0 | 0 | 0 | Netflix |
| 3 | 421 | Shirkers | 2018 | NR | 7.4 | 100 | Sandi Tan | Sandi Tan,Jasmine Kin Kia Ng,Philip Cheah,Soph... | Documentary | United States,United Kingdom | English | In 1992, teenager Sandi Tan and her friends So... | 97 | movie | 1 | 0 | 0 | 0 | 0 | Netflix |
| 4 | 970 | Restless Creature: Wendy Whelan | 2017 | NR | 7.1 | 100 | Linda Saffire,Adam Schlesinger | Peter Martins,David Prottas,Wendy Whelan | Documentary | United States | English | NA | 90 | movie | 1 | 0 | 0 | 0 | 0 | Netflix |
fig = px.bar(y = netflix_roto_high_movies['Title'][:15],
x = netflix_roto_high_movies['Rotten Tomatoes'][:15],
color = netflix_roto_high_movies['Rotten Tomatoes'][:15],
color_continuous_scale = 'Teal_r',
labels = { 'y' : 'Movies', 'x' : 'Rotten Tomatoes : Rating'},
title = 'Movies with Highest Rotten Tomatoes : Netflix')
fig.update_layout(plot_bgcolor = 'white')
fig.show()
fig = px.bar(y = netflix_roto_low_movies['Title'][:15],
x = netflix_roto_low_movies['Rotten Tomatoes'][:15],
color = netflix_roto_low_movies['Rotten Tomatoes'][:15],
color_continuous_scale = 'Teal_r',
labels = { 'y' : 'Movies', 'x' : 'Rotten Tomatoes : Rating'},
title = 'Movies with Lowest Rotten Tomatoes : Netflix')
fig.update_layout(plot_bgcolor = 'white')
fig.show()
hulu_roto_high_movies = df_roto_high_movies.loc[df_roto_high_movies['Hulu']==1].reset_index()
hulu_roto_high_movies = hulu_roto_high_movies.drop(['index'], axis = 1)
hulu_roto_low_movies = df_roto_low_movies.loc[df_roto_low_movies['Hulu']==1].reset_index()
hulu_roto_low_movies = hulu_roto_low_movies.drop(['index'], axis = 1)
hulu_roto_high_movies.head(5)
| ID | Title | Year | Age | IMDb | Rotten Tomatoes | Directors | Cast | Genres | Country | Language | Plotline | Runtime | Kind | Netflix | Hulu | Prime Video | Disney+ | Type | Service Provider | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 3665 | After the Screaming Stops | 2018 | 18 | 7.2 | 100 | Joe Pearlman,David Soutar | Luke Goss,Matt Goss,Ron Perlman,Robin Antin,Ge... | Documentary,Music | United Kingdom | English | In the 1980s, "Bros" were one of the biggest b... | 98 | movie | 0 | 1 | 0 | 0 | 0 | Hulu |
| 1 | 3638 | Andy Irons: Kissed by God | 2018 | NR | 8.2 | 100 | Steve Jones,Todd Jones | Bruce Irons,Lyndie Irons,Kelly Slater | Documentary | United States | English | A film about bipolar disorder and opioid addic... | 100 | movie | 0 | 1 | 1 | 0 | 0 | Prime Video |
| 2 | 3656 | Burn | 2012 | 16 | 5.7 | 100 | Mike Gan | Tilda Cobham-Hervey,Josh Hutcherson,Suki Water... | Comedy,Crime,Thriller | United States | English | NA | 88 | movie | 0 | 1 | 1 | 0 | 0 | Prime Video |
| 3 | 3739 | Food Evolution | 2017 | 7 | 7 | 100 | Scott Hamilton Kennedy | Raoul Adamchak,Charles Benbrook,Karl Haro von ... | Documentary | United States | English | Food Evolution looks at one of the most critic... | 92 | movie | 0 | 1 | 0 | 0 | 0 | Hulu |
| 4 | 3741 | The Den | 2013 | 16 | 6 | 100 | Zachary Donohue | Melanie Papalia,David Schlachtenhaufen,Adam Sh... | Horror,Mystery,Thriller | United States | English | A young woman studying the habits of webcam ch... | 76 | movie | 0 | 1 | 0 | 0 | 0 | Hulu |
fig = px.bar(y = hulu_roto_high_movies['Title'][:15],
x = hulu_roto_high_movies['Rotten Tomatoes'][:15],
color = hulu_roto_high_movies['Rotten Tomatoes'][:15],
color_continuous_scale = 'Teal_r',
labels = { 'y' : 'Movies', 'x' : 'Rotten Tomatoes : Rating'},
title = 'Movies with Highest Rotten Tomatoes : Hulu')
fig.update_layout(plot_bgcolor = 'white')
fig.show()
fig = px.bar(y = hulu_roto_low_movies['Title'][:15],
x = hulu_roto_low_movies['Rotten Tomatoes'][:15],
color = hulu_roto_low_movies['Rotten Tomatoes'][:15],
color_continuous_scale = 'Teal_r',
labels = { 'y' : 'Movies', 'x' : 'Rotten Tomatoes : Rating'},
title = 'Movies with Lowest Rotten Tomatoes : Hulu')
fig.update_layout(plot_bgcolor = 'white')
fig.show()
prime_video_roto_high_movies = df_roto_high_movies.loc[df_roto_high_movies['Prime Video']==1].reset_index()
prime_video_roto_high_movies = prime_video_roto_high_movies.drop(['index'], axis = 1)
prime_video_roto_low_movies = df_roto_low_movies.loc[df_roto_low_movies['Prime Video']==1].reset_index()
prime_video_roto_low_movies = prime_video_roto_low_movies.drop(['index'], axis = 1)
prime_video_roto_high_movies.head(5)
| ID | Title | Year | Age | IMDb | Rotten Tomatoes | Directors | Cast | Genres | Country | Language | Plotline | Runtime | Kind | Netflix | Hulu | Prime Video | Disney+ | Type | Service Provider | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 4561 | Pyaasa | 1957 | NR | 8.5 | 100 | Guru Dutt | Guru Dutt,Waheeda Rehman,Mala Sinha,Rehman,Joh... | Drama,Musical,Romance | India | Hindi | Unemployed Vijay is the youngest in his family... | 146 | movie | 0 | 0 | 1 | 0 | 0 | Prime Video |
| 1 | 4405 | My Name Is Nobody | 1973 | 7 | 7.5 | 100 | Tonino Valerii | Terence Hill,Henry Fonda,Jean Martin,R.G. Arms... | Comedy,Western | Italy,France,West Germany | Italian | Jack Beauregard, once the greatest gunslinger ... | 116 | movie | 0 | 0 | 1 | 0 | 0 | Prime Video |
| 2 | 5255 | Racing Dreams | 2010 | 7 | 7 | 100 | Marshall Curry | Annabeth Barnes,Josh Hobson,Brandon Warren,Rus... | Documentary,Sport | United States | English | Sidney Poitier returned to the big screen in t... | 93 | movie | 0 | 0 | 1 | 0 | 0 | Prime Video |
| 3 | 5259 | Shoot to Kill | 1988 | 16 | 6.8 | 100 | Roger Spottiswoode | Sidney Poitier,Tom Berenger,Kirstie Alley,Clan... | Action,Adventure,Crime,Drama,Thriller | United States,Canada | English | Down on his luck and perpetually impecunious, ... | 110 | movie | 0 | 0 | 1 | 0 | 0 | Prime Video |
| 4 | 10259 | The Surface | 2015 | NR | 4.8 | 100 | Gil Cates Jr. | Sean Astin,Mimi Rogers,Chris Mulkey,John Emmet... | Drama,Thriller | United States | English | NA | 90 | movie | 0 | 0 | 1 | 0 | 0 | Prime Video |
fig = px.bar(y = prime_video_roto_high_movies['Title'][:15],
x = prime_video_roto_high_movies['Rotten Tomatoes'][:15],
color = prime_video_roto_high_movies['Rotten Tomatoes'][:15],
color_continuous_scale = 'Teal_r',
labels = { 'y' : 'Movies', 'x' : 'Rotten Tomatoes : Rating'},
title = 'Movies with Highest Rotten Tomatoes : Prime Video')
fig.update_layout(plot_bgcolor = 'white')
fig.show()
fig = px.bar(y = prime_video_roto_low_movies['Title'][:15],
x = prime_video_roto_low_movies['Rotten Tomatoes'][:15],
color = prime_video_roto_low_movies['Rotten Tomatoes'][:15],
color_continuous_scale = 'Teal_r',
labels = { 'y' : 'Movies', 'x' : 'Rotten Tomatoes : Rating'},
title = 'Movies with Lowest Rotten Tomatoes : Prime Video')
fig.update_layout(plot_bgcolor = 'white')
fig.show()
disney_roto_high_movies = df_roto_high_movies.loc[df_roto_high_movies['Disney+']==1].reset_index()
disney_roto_high_movies = disney_roto_high_movies.drop(['index'], axis = 1)
disney_roto_low_movies = df_roto_low_movies.loc[df_roto_low_movies['Disney+']==1].reset_index()
disney_roto_low_movies = disney_roto_low_movies.drop(['index'], axis = 1)
disney_roto_high_movies.head(5)
| ID | Title | Year | Age | IMDb | Rotten Tomatoes | Directors | Cast | Genres | Country | Language | Plotline | Runtime | Kind | Netflix | Hulu | Prime Video | Disney+ | Type | Service Provider | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 15804 | The Many Adventures of Winnie the Pooh | 1977 | 0 | 7.6 | 100 | John Lounsbery,Wolfgang Reitherman,Ben Sharpsteen | Sebastian Cabot,Junius Matthews,Barbara Luddy,... | Animation,Adventure,Comedy,Family,Musical | United States | English | When young Victor's pet dog Sparky (who stars ... | 74 | movie | 0 | 0 | 0 | 1 | 0 | Disney+ |
| 1 | 15807 | Mickey's Christmas Carol | 1983 | 0 | 8 | 100 | Burny Mattinson | Alan Young,Wayne Allwine,Hal Smith,Will Ryan,E... | Animation,Short,Comedy,Family,Fantasy | United States | English | Sam Flynn, the tech-savvy 27-year-old son of K... | 26 | movie | 0 | 0 | 0 | 1 | 0 | Disney+ |
| 2 | 15844 | Old Yeller | 1957 | 0 | 7.3 | 100 | Robert Stevenson | Dorothy McGuire,Fess Parker,Jeff York,Chuck Co... | Adventure,Drama,Family,Western | United States | English | Two stories. The Wind in the Willows: Concise ... | 83 | movie | 0 | 0 | 0 | 1 | 0 | Disney+ |
| 3 | 15846 | Phineas and Ferb the Movie: Across the 2nd Dim... | 2011 | 0 | 7.4 | 100 | Robert Hughes,Dan Povenmire,Jay Lender,Jeff 'S... | Vincent Martella,Ashley Tisdale,Thomas Brodie-... | Animation,Action,Adventure,Comedy,Family,Music... | United States,Taiwan,China | Mandarin,Chinese,Min Nan,English | During World War II in England, Charlie (Ian W... | 78 | movie | 0 | 0 | 0 | 1 | 0 | Disney+ |
| 4 | 15858 | Tinker Bell and the Lost Treasure | 2009 | 0 | 6.7 | 100 | Klay Hall | Mae Whitman,Jesse McCartney,Jane Horrocks,Lucy... | Animation,Adventure,Family,Fantasy | United States | English | A little girl comes to a town that is embattle... | 81 | movie | 0 | 0 | 0 | 1 | 0 | Disney+ |
fig = px.bar(y = disney_roto_high_movies['Title'][:15],
x = disney_roto_high_movies['Rotten Tomatoes'][:15],
color = disney_roto_high_movies['Rotten Tomatoes'][:15],
color_continuous_scale = 'Teal_r',
labels = { 'y' : 'Movies', 'x' : 'Rotten Tomatoes : Rating'},
title = 'Movies with Highest Rotten Tomatoes : Disney+')
fig.update_layout(plot_bgcolor = 'white')
fig.show()
fig = px.bar(y = disney_roto_low_movies['Title'][:15],
x = disney_roto_low_movies['Rotten Tomatoes'][:15],
color = disney_roto_low_movies['Rotten Tomatoes'][:15],
color_continuous_scale = 'Teal_r',
labels = { 'y' : 'Movies', 'x' : 'Rotten Tomatoes : Rating'},
title = 'Movies with Lowest Rotten Tomatoes : Disney+')
fig.update_layout(plot_bgcolor = 'white')
fig.show()
print(f'''
The Movie with Highest Rotten Tomatoes Ever Got is '{df_roto_high_movies['Title'][0]}' : '{df_roto_high_movies['Rotten Tomatoes'].max()}'\n
The Movie with Lowest Rotten Tomatoes Ever Got is '{df_roto_low_movies['Title'][0]}' : '{df_roto_low_movies['Rotten Tomatoes'].min()}'\n
The Movie with Highest Rotten Tomatoes on 'Netflix' is '{netflix_roto_high_movies['Title'][0]}' : '{netflix_roto_high_movies['Rotten Tomatoes'].max()}'\n
The Movie with Lowest Rotten Tomatoes on 'Netflix' is '{netflix_roto_low_movies['Title'][0]}' : '{netflix_roto_low_movies['Rotten Tomatoes'].min()}'\n
The Movie with Highest Rotten Tomatoes on 'Hulu' is '{hulu_roto_high_movies['Title'][0]}' : '{hulu_roto_high_movies['Rotten Tomatoes'].max()}'\n
The Movie with Lowest Rotten Tomatoes on 'Hulu' is '{hulu_roto_low_movies['Title'][0]}' : '{hulu_roto_low_movies['Rotten Tomatoes'].min()}'\n
The Movie with Highest Rotten Tomatoes on 'Prime Video' is '{prime_video_roto_high_movies['Title'][0]}' : '{prime_video_roto_high_movies['Rotten Tomatoes'].max()}'\n
The Movie with Lowest Rotten Tomatoes on 'Prime Video' is '{prime_video_roto_low_movies['Title'][0]}' : '{prime_video_roto_low_movies['Rotten Tomatoes'].min()}'\n
The Movie with Highest Rotten Tomatoes on 'Disney+' is '{disney_roto_high_movies['Title'][0]}' : '{disney_roto_high_movies['Rotten Tomatoes'].max()}'\n
The Movie with Lowest Rotten Tomatoes on 'Disney+' is '{disney_roto_low_movies['Title'][0]}' : '{disney_roto_low_movies['Rotten Tomatoes'].min()}'\n
''')
The Movie with Highest Rotten Tomatoes Ever Got is 'Pyaasa' : '100'
The Movie with Lowest Rotten Tomatoes Ever Got is 'Term Life' : '0'
The Movie with Highest Rotten Tomatoes on 'Netflix' is 'Ice Guardians' : '100'
The Movie with Lowest Rotten Tomatoes on 'Netflix' is 'Term Life' : '0'
The Movie with Highest Rotten Tomatoes on 'Hulu' is 'After the Screaming Stops' : '100'
The Movie with Lowest Rotten Tomatoes on 'Hulu' is 'Four Lovers' : '0'
The Movie with Highest Rotten Tomatoes on 'Prime Video' is 'Pyaasa' : '100'
The Movie with Lowest Rotten Tomatoes on 'Prime Video' is 'Speed Kills' : '0'
The Movie with Highest Rotten Tomatoes on 'Disney+' is 'The Many Adventures of Winnie the Pooh' : '100'
The Movie with Lowest Rotten Tomatoes on 'Disney+' is 'Mulan II' : '0'
print(f'''
Accross All Platforms the Average Rotten Tomatoes is '{round(df_movies_roto['Rotten Tomatoes'].mean(), ndigits = 2)}'\n
The Average Rotten Tomatoes on 'Netflix' is '{round(netflix_roto_movies['Rotten Tomatoes'].mean(), ndigits = 2)}'\n
The Average Rotten Tomatoes on 'Hulu' is '{round(hulu_roto_movies['Rotten Tomatoes'].mean(), ndigits = 2)}'\n
The Average Rotten Tomatoes on 'Prime Video' is '{round(prime_video_roto_movies['Rotten Tomatoes'].mean(), ndigits = 2)}'\n
The Average Rotten Tomatoes on 'Disney+' is '{round(disney_roto_movies['Rotten Tomatoes'].mean(), ndigits = 2)}'\n
''')
Accross All Platforms the Average Rotten Tomatoes is '63.95'
The Average Rotten Tomatoes on 'Netflix' is '64.64'
The Average Rotten Tomatoes on 'Hulu' is '65.85'
The Average Rotten Tomatoes on 'Prime Video' is '62.94'
The Average Rotten Tomatoes on 'Disney+' is '62.54'
f, ax = plt.subplots(1, 2 , figsize = (20, 5))
sns.distplot(df_movies_roto['Rotten Tomatoes'],bins = 20, kde = True, ax = ax[0])
sns.boxplot(df_movies_roto['Rotten Tomatoes'], ax = ax[1])
plt.show()
# Defining plot size and title
plt.figure(figsize = (20, 5))
plt.title('Rotten Tomatoes s Per Platform')
# Plotting the information from each dataset into a histogram
sns.histplot(prime_video_roto_movies['Rotten Tomatoes'][:100], color = 'lightblue', legend = True, kde = True)
sns.histplot(netflix_roto_movies['Rotten Tomatoes'][:100], color = 'red', legend = True, kde = True)
sns.histplot(hulu_roto_movies['Rotten Tomatoes'][:100], color = 'lightgreen', legend = True, kde = True)
sns.histplot(disney_roto_movies['Rotten Tomatoes'][:100], color = 'darkblue', legend = True, kde = True)
# Setting the legend
plt.legend(['Prime Video', 'Netflix', 'Hulu', 'Disney+'])
plt.show()
def round_val(data):
if str(data) != 'nan':
return round(data)
def round_fix(data):
if data in range(0,11):
# print(data)
return 10
if data in range(11,21):
return 20
if data in range(21,31):
return 30
if data in range(31,41):
return 40
if data in range(41,51):
return 50
if data in range(51,61):
return 60
if data in range(61,71):
return 70
if data in range(71,81):
return 80
if data in range(81,91):
return 90
if data in range(91,101):
return 100
df_movies_roto_group['Rotten Tomatoes Group'] = df_movies_roto['Rotten Tomatoes'].apply(round_fix)
roto_values = df_movies_roto_group['Rotten Tomatoes Group'].value_counts().sort_index(ascending = False).tolist()
roto_index = df_movies_roto_group['Rotten Tomatoes Group'].value_counts().sort_index(ascending = False).index
# roto_values, roto_index
roto_group_count = df_movies_roto_group.groupby('Rotten Tomatoes Group')['Title'].count()
roto_group_movies = df_movies_roto_group.groupby('Rotten Tomatoes Group')[['Netflix', 'Hulu', 'Prime Video', 'Disney+']].sum()
roto_group_data_movies = pd.concat([roto_group_count, roto_group_movies], axis = 1).reset_index().rename(columns = {'Title' : 'Movies Count'})
roto_group_data_movies = roto_group_data_movies.sort_values(by = 'Movies Count', ascending = False)
# Rotten Tomatoes Group with Movies Counts - All Platforms Combined
roto_group_data_movies.sort_values(by = 'Movies Count', ascending = False)
| Rotten Tomatoes Group | Movies Count | Netflix | Hulu | Prime Video | Disney+ | |
|---|---|---|---|---|---|---|
| 9 | 100 | 1265 | 386 | 128 | 746 | 61 |
| 8 | 90 | 1103 | 284 | 166 | 674 | 52 |
| 7 | 80 | 844 | 217 | 81 | 535 | 55 |
| 6 | 70 | 666 | 185 | 70 | 410 | 39 |
| 4 | 50 | 543 | 142 | 53 | 350 | 26 |
| 5 | 60 | 528 | 138 | 49 | 333 | 40 |
| 3 | 40 | 510 | 139 | 51 | 323 | 39 |
| 1 | 20 | 389 | 110 | 35 | 253 | 24 |
| 2 | 30 | 374 | 97 | 39 | 236 | 25 |
| 0 | 10 | 264 | 68 | 25 | 191 | 7 |
roto_group_data_movies.sort_values(by = 'Rotten Tomatoes Group', ascending = False)
| Rotten Tomatoes Group | Movies Count | Netflix | Hulu | Prime Video | Disney+ | |
|---|---|---|---|---|---|---|
| 9 | 100 | 1265 | 386 | 128 | 746 | 61 |
| 8 | 90 | 1103 | 284 | 166 | 674 | 52 |
| 7 | 80 | 844 | 217 | 81 | 535 | 55 |
| 6 | 70 | 666 | 185 | 70 | 410 | 39 |
| 5 | 60 | 528 | 138 | 49 | 333 | 40 |
| 4 | 50 | 543 | 142 | 53 | 350 | 26 |
| 3 | 40 | 510 | 139 | 51 | 323 | 39 |
| 2 | 30 | 374 | 97 | 39 | 236 | 25 |
| 1 | 20 | 389 | 110 | 35 | 253 | 24 |
| 0 | 10 | 264 | 68 | 25 | 191 | 7 |
fig = px.bar(y = roto_group_data_movies['Movies Count'],
x = roto_group_data_movies['Rotten Tomatoes Group'],
color = roto_group_data_movies['Rotten Tomatoes Group'],
color_continuous_scale = 'Teal_r',
labels = { 'y' : 'Movies Count', 'x' : 'Rotten Tomatoes : Rating'},
title = 'Movies with Group Rotten Tomatoes : All Platforms')
fig.update_layout(plot_bgcolor = "white")
fig.show()
fig = px.pie(roto_group_data_movies[:10],
names = roto_group_data_movies['Rotten Tomatoes Group'],
values = roto_group_data_movies['Movies Count'],
color = roto_group_data_movies['Movies Count'],
color_discrete_sequence = px.colors.sequential.Teal)
fig.update_traces(textinfo = 'percent+label',
title = 'Movies Count based on Rotten Tomatoes Group')
fig.show()
df_roto_group_high_movies = roto_group_data_movies.sort_values(by = 'Movies Count', ascending = False).reset_index()
df_roto_group_high_movies = df_roto_group_high_movies.drop(['index'], axis = 1)
# filter = (roto_group_data_movies['Movies Count'] == (roto_group_data_movies['Movies Count'].max()))
# df_roto_group_high_movies = roto_group_data_movies[filter]
# highest_rated_movies = roto_group_data_movies.loc[roto_group_data_movies['Movies Count'].idxmax()]
# print('\nRotten Tomatoes with Highest Ever Movies Count are : All Platforms Combined\n')
df_roto_group_high_movies.head(5)
| Rotten Tomatoes Group | Movies Count | Netflix | Hulu | Prime Video | Disney+ | |
|---|---|---|---|---|---|---|
| 0 | 100 | 1265 | 386 | 128 | 746 | 61 |
| 1 | 90 | 1103 | 284 | 166 | 674 | 52 |
| 2 | 80 | 844 | 217 | 81 | 535 | 55 |
| 3 | 70 | 666 | 185 | 70 | 410 | 39 |
| 4 | 50 | 543 | 142 | 53 | 350 | 26 |
df_roto_group_low_movies = roto_group_data_movies.sort_values(by = 'Movies Count', ascending = True).reset_index()
df_roto_group_low_movies = df_roto_group_low_movies.drop(['index'], axis = 1)
# filter = (roto_group_data_movies['Movies Count'] = = (roto_group_data_movies['Movies Count'].min()))
# df_roto_group_low_movies = roto_group_data_movies[filter]
# print('\nRotten Tomatoes with Lowest Ever Movies Count are : All Platforms Combined\n')
df_roto_group_low_movies.head(5)
| Rotten Tomatoes Group | Movies Count | Netflix | Hulu | Prime Video | Disney+ | |
|---|---|---|---|---|---|---|
| 0 | 10 | 264 | 68 | 25 | 191 | 7 |
| 1 | 30 | 374 | 97 | 39 | 236 | 25 |
| 2 | 20 | 389 | 110 | 35 | 253 | 24 |
| 3 | 40 | 510 | 139 | 51 | 323 | 39 |
| 4 | 60 | 528 | 138 | 49 | 333 | 40 |
print(f'''
Total '{df_movies_roto['Rotten Tomatoes'].count()}' Titles are available on All Platforms, out of which\n
You Can Choose to see Movies from Total '{roto_group_data_movies['Rotten Tomatoes Group'].unique().shape[0]}' Rotten Tomatoes Group, They were Like this, \n
{roto_group_data_movies.sort_values(by = 'Movies Count', ascending = False)['Rotten Tomatoes Group'].unique()} etc. \n
The Rotten Tomatoes Group with Highest Movies Count have '{roto_group_data_movies['Movies Count'].max()}' Movies Available is '{df_roto_group_high_movies['Rotten Tomatoes Group'][0]}', &\n
The Rotten Tomatoes Group with Lowest Movies Count have '{roto_group_data_movies['Movies Count'].min()}' Movies Available is '{df_roto_group_low_movies['Rotten Tomatoes Group'][0]}'
''')
Total '6486' Titles are available on All Platforms, out of which
You Can Choose to see Movies from Total '10' Rotten Tomatoes Group, They were Like this,
[100 90 80 70 50 60 40 20 30 10] etc.
The Rotten Tomatoes Group with Highest Movies Count have '1265' Movies Available is '100', &
The Rotten Tomatoes Group with Lowest Movies Count have '264' Movies Available is '10'
netflix_roto_group_movies = roto_group_data_movies[roto_group_data_movies['Netflix'] != 0].sort_values(by = 'Netflix', ascending = False).reset_index()
netflix_roto_group_movies = netflix_roto_group_movies.drop(['index', 'Hulu', 'Prime Video', 'Disney+', 'Movies Count'], axis = 1)
netflix_roto_group_high_movies = df_roto_group_high_movies.sort_values(by = 'Netflix', ascending = False).reset_index()
netflix_roto_group_high_movies = netflix_roto_group_high_movies.drop(['index'], axis = 1)
netflix_roto_group_low_movies = df_roto_group_high_movies.sort_values(by = 'Netflix', ascending = True).reset_index()
netflix_roto_group_low_movies = netflix_roto_group_low_movies.drop(['index'], axis = 1)
netflix_roto_group_high_movies.head(5)
| Rotten Tomatoes Group | Movies Count | Netflix | Hulu | Prime Video | Disney+ | |
|---|---|---|---|---|---|---|
| 0 | 100 | 1265 | 386 | 128 | 746 | 61 |
| 1 | 90 | 1103 | 284 | 166 | 674 | 52 |
| 2 | 80 | 844 | 217 | 81 | 535 | 55 |
| 3 | 70 | 666 | 185 | 70 | 410 | 39 |
| 4 | 50 | 543 | 142 | 53 | 350 | 26 |
hulu_roto_group_movies = roto_group_data_movies[roto_group_data_movies['Hulu'] != 0].sort_values(by = 'Hulu', ascending = False).reset_index()
hulu_roto_group_movies = hulu_roto_group_movies.drop(['index', 'Netflix', 'Prime Video', 'Disney+', 'Movies Count'], axis = 1)
hulu_roto_group_high_movies = df_roto_group_high_movies.sort_values(by = 'Hulu', ascending = False).reset_index()
hulu_roto_group_high_movies = hulu_roto_group_high_movies.drop(['index'], axis = 1)
hulu_roto_group_low_movies = df_roto_group_high_movies.sort_values(by = 'Hulu', ascending = True).reset_index()
hulu_roto_group_low_movies = hulu_roto_group_low_movies.drop(['index'], axis = 1)
hulu_roto_group_high_movies.head(5)
| Rotten Tomatoes Group | Movies Count | Netflix | Hulu | Prime Video | Disney+ | |
|---|---|---|---|---|---|---|
| 0 | 90 | 1103 | 284 | 166 | 674 | 52 |
| 1 | 100 | 1265 | 386 | 128 | 746 | 61 |
| 2 | 80 | 844 | 217 | 81 | 535 | 55 |
| 3 | 70 | 666 | 185 | 70 | 410 | 39 |
| 4 | 50 | 543 | 142 | 53 | 350 | 26 |
prime_video_roto_group_movies = roto_group_data_movies[roto_group_data_movies['Prime Video'] != 0].sort_values(by = 'Prime Video', ascending = False).reset_index()
prime_video_roto_group_movies = prime_video_roto_group_movies.drop(['index', 'Netflix', 'Hulu', 'Disney+', 'Movies Count'], axis = 1)
prime_video_roto_group_high_movies = df_roto_group_high_movies.sort_values(by = 'Prime Video', ascending = False).reset_index()
prime_video_roto_group_high_movies = prime_video_roto_group_high_movies.drop(['index'], axis = 1)
prime_video_roto_group_low_movies = df_roto_group_high_movies.sort_values(by = 'Prime Video', ascending = True).reset_index()
prime_video_roto_group_low_movies = prime_video_roto_group_low_movies.drop(['index'], axis = 1)
prime_video_roto_group_high_movies.head(5)
| Rotten Tomatoes Group | Movies Count | Netflix | Hulu | Prime Video | Disney+ | |
|---|---|---|---|---|---|---|
| 0 | 100 | 1265 | 386 | 128 | 746 | 61 |
| 1 | 90 | 1103 | 284 | 166 | 674 | 52 |
| 2 | 80 | 844 | 217 | 81 | 535 | 55 |
| 3 | 70 | 666 | 185 | 70 | 410 | 39 |
| 4 | 50 | 543 | 142 | 53 | 350 | 26 |
disney_roto_group_movies = roto_group_data_movies[roto_group_data_movies['Disney+'] != 0].sort_values(by = 'Disney+', ascending = False).reset_index()
disney_roto_group_movies = disney_roto_group_movies.drop(['index', 'Netflix', 'Hulu', 'Prime Video', 'Movies Count'], axis = 1)
disney_roto_group_high_movies = df_roto_group_high_movies.sort_values(by = 'Disney+', ascending = False).reset_index()
disney_roto_group_high_movies = disney_roto_group_high_movies.drop(['index'], axis = 1)
disney_roto_group_low_movies = df_roto_group_high_movies.sort_values(by = 'Disney+', ascending = True).reset_index()
disney_roto_group_low_movies = disney_roto_group_low_movies.drop(['index'], axis = 1)
disney_roto_group_high_movies.head(5)
| Rotten Tomatoes Group | Movies Count | Netflix | Hulu | Prime Video | Disney+ | |
|---|---|---|---|---|---|---|
| 0 | 100 | 1265 | 386 | 128 | 746 | 61 |
| 1 | 80 | 844 | 217 | 81 | 535 | 55 |
| 2 | 90 | 1103 | 284 | 166 | 674 | 52 |
| 3 | 60 | 528 | 138 | 49 | 333 | 40 |
| 4 | 70 | 666 | 185 | 70 | 410 | 39 |
print(f'''
The Rotten Tomatoes Group with Highest Movies Count Ever Got is '{df_roto_group_high_movies['Rotten Tomatoes Group'][0]}' : '{df_roto_group_high_movies['Movies Count'].max()}'\n
The Rotten Tomatoes Group with Lowest Movies Count Ever Got is '{df_roto_group_low_movies['Rotten Tomatoes Group'][0]}' : '{df_roto_group_low_movies['Movies Count'].min()}'\n
The Rotten Tomatoes Group with Highest Movies Count on 'Netflix' is '{netflix_roto_group_high_movies['Rotten Tomatoes Group'][0]}' : '{netflix_roto_group_high_movies['Netflix'].max()}'\n
The Rotten Tomatoes Group with Lowest Movies Count on 'Netflix' is '{netflix_roto_group_low_movies['Rotten Tomatoes Group'][0]}' : '{netflix_roto_group_low_movies['Netflix'].min()}'\n
The Rotten Tomatoes Group with Highest Movies Count on 'Hulu' is '{hulu_roto_group_high_movies['Rotten Tomatoes Group'][0]}' : '{hulu_roto_group_high_movies['Hulu'].max()}'\n
The Rotten Tomatoes Group with Lowest Movies Count on 'Hulu' is '{hulu_roto_group_low_movies['Rotten Tomatoes Group'][0]}' : '{hulu_roto_group_low_movies['Hulu'].min()}'\n
The Rotten Tomatoes Group with Highest Movies Count on 'Prime Video' is '{prime_video_roto_group_high_movies['Rotten Tomatoes Group'][0]}' : '{prime_video_roto_group_high_movies['Prime Video'].max()}'\n
The Rotten Tomatoes Group with Lowest Movies Count on 'Prime Video' is '{prime_video_roto_group_low_movies['Rotten Tomatoes Group'][0]}' : '{prime_video_roto_group_low_movies['Prime Video'].min()}'\n
The Rotten Tomatoes Group with Highest Movies Count on 'Disney+' is '{disney_roto_group_high_movies['Rotten Tomatoes Group'][0]}' : '{disney_roto_group_high_movies['Disney+'].max()}'\n
The Rotten Tomatoes Group with Lowest Movies Count on 'Disney+' is '{disney_roto_group_low_movies['Rotten Tomatoes Group'][0]}' : '{disney_roto_group_low_movies['Disney+'].min()}'\n
''')
The Rotten Tomatoes Group with Highest Movies Count Ever Got is '100' : '1265'
The Rotten Tomatoes Group with Lowest Movies Count Ever Got is '10' : '264'
The Rotten Tomatoes Group with Highest Movies Count on 'Netflix' is '100' : '386'
The Rotten Tomatoes Group with Lowest Movies Count on 'Netflix' is '10' : '68'
The Rotten Tomatoes Group with Highest Movies Count on 'Hulu' is '90' : '166'
The Rotten Tomatoes Group with Lowest Movies Count on 'Hulu' is '10' : '25'
The Rotten Tomatoes Group with Highest Movies Count on 'Prime Video' is '100' : '746'
The Rotten Tomatoes Group with Lowest Movies Count on 'Prime Video' is '10' : '191'
The Rotten Tomatoes Group with Highest Movies Count on 'Disney+' is '100' : '61'
The Rotten Tomatoes Group with Lowest Movies Count on 'Disney+' is '10' : '7'
fig, axes = plt.subplots(2, 2, figsize = (20 , 20))
n_ro_ax1 = sns.barplot(x = netflix_roto_group_movies['Rotten Tomatoes Group'][:10], y = netflix_roto_group_movies['Netflix'][:10], palette = 'Reds_r', ax = axes[0, 0])
h_ro_ax2 = sns.barplot(x = hulu_roto_group_movies['Rotten Tomatoes Group'][:10], y = hulu_roto_group_movies['Hulu'][:10], palette = 'Greens_r', ax = axes[0, 1])
p_ro_ax3 = sns.barplot(x = prime_video_roto_group_movies['Rotten Tomatoes Group'][:10], y = prime_video_roto_group_movies['Prime Video'][:10], palette = 'Blues_r', ax = axes[1, 0])
d_ro_ax4 = sns.barplot(x = disney_roto_group_movies['Rotten Tomatoes Group'][:10], y = disney_roto_group_movies['Disney+'][:10], palette = 'BuPu_r', ax = axes[1, 1])
labels = ['Netflix', 'Hulu', 'Prime Video', 'Disney+']
n_ro_ax1.title.set_text(labels[0])
h_ro_ax2.title.set_text(labels[1])
p_ro_ax3.title.set_text(labels[2])
d_ro_ax4.title.set_text(labels[3])
plt.show()
plt.figure(figsize = (20, 5))
sns.lineplot(x = roto_group_data_movies['Rotten Tomatoes Group'], y = roto_group_data_movies['Netflix'], color = 'red')
sns.lineplot(x = roto_group_data_movies['Rotten Tomatoes Group'], y = roto_group_data_movies['Hulu'], color = 'lightgreen')
sns.lineplot(x = roto_group_data_movies['Rotten Tomatoes Group'], y = roto_group_data_movies['Prime Video'], color = 'lightblue')
sns.lineplot(x = roto_group_data_movies['Rotten Tomatoes Group'], y = roto_group_data_movies['Disney+'], color = 'darkblue')
plt.xlabel('Rotten Tomatoes Group', fontsize = 15)
plt.ylabel('Movies Count', fontsize = 15)
plt.show()
print(f'''
Accross All Platforms Total Count of Rotten Tomatoes Group is '{roto_group_data_movies['Rotten Tomatoes Group'].unique().shape[0]}'\n
Total Count of Rotten Tomatoes Group on 'Netflix' is '{netflix_roto_group_movies['Rotten Tomatoes Group'].unique().shape[0]}'\n
Total Count of Rotten Tomatoes Group on 'Hulu' is '{hulu_roto_group_movies['Rotten Tomatoes Group'].unique().shape[0]}'\n
Total Count of Rotten Tomatoes Group on 'Prime Video' is '{prime_video_roto_group_movies['Rotten Tomatoes Group'].unique().shape[0]}'\n
Total Count of Rotten Tomatoes Group on 'Disney+' is '{disney_roto_group_movies['Rotten Tomatoes Group'].unique().shape[0]}'\n
''')
Accross All Platforms Total Count of Rotten Tomatoes Group is '10'
Total Count of Rotten Tomatoes Group on 'Netflix' is '10'
Total Count of Rotten Tomatoes Group on 'Hulu' is '10'
Total Count of Rotten Tomatoes Group on 'Prime Video' is '10'
Total Count of Rotten Tomatoes Group on 'Disney+' is '10'
fig, axes = plt.subplots(2, 2, figsize = (20 , 20))
n_ro_ax1 = sns.lineplot(y = roto_group_data_movies['Rotten Tomatoes Group'], x = roto_group_data_movies['Netflix'], color = 'red', ax = axes[0, 0])
h_ro_ax2 = sns.lineplot(y = roto_group_data_movies['Rotten Tomatoes Group'], x = roto_group_data_movies['Hulu'], color = 'lightgreen', ax = axes[0, 1])
p_ro_ax3 = sns.lineplot(y = roto_group_data_movies['Rotten Tomatoes Group'], x = roto_group_data_movies['Prime Video'], color = 'lightblue', ax = axes[1, 0])
d_ro_ax4 = sns.lineplot(y = roto_group_data_movies['Rotten Tomatoes Group'], x = roto_group_data_movies['Disney+'], color = 'darkblue', ax = axes[1, 1])
labels = ['Netflix', 'Hulu', 'Prime Video', 'Disney+']
n_ro_ax1.title.set_text(labels[0])
h_ro_ax2.title.set_text(labels[1])
p_ro_ax3.title.set_text(labels[2])
d_ro_ax4.title.set_text(labels[3])
plt.show()
fig, axes = plt.subplots(2, 2, figsize = (20 , 20))
n_ro_ax1 = sns.barplot(x = roto_group_data_movies['Rotten Tomatoes Group'][:10], y = roto_group_data_movies['Netflix'][:10], palette = 'Reds_r', ax = axes[0, 0])
h_ro_ax2 = sns.barplot(x = roto_group_data_movies['Rotten Tomatoes Group'][:10], y = roto_group_data_movies['Hulu'][:10], palette = 'Greens_r', ax = axes[0, 1])
p_ro_ax3 = sns.barplot(x = roto_group_data_movies['Rotten Tomatoes Group'][:10], y = roto_group_data_movies['Prime Video'][:10], palette = 'Blues_r', ax = axes[1, 0])
d_ro_ax4 = sns.barplot(x = roto_group_data_movies['Rotten Tomatoes Group'][:10], y = roto_group_data_movies['Disney+'][:10], palette = 'BuPu_r', ax = axes[1, 1])
labels = ['Netflix', 'Hulu', 'Prime Video', 'Disney+']
n_ro_ax1.title.set_text(labels[0])
h_ro_ax2.title.set_text(labels[1])
p_ro_ax3.title.set_text(labels[2])
d_ro_ax4.title.set_text(labels[3])
plt.show()